3.9.12 \(\int \frac {(f+g x)^n (a+2 c d x+c e x^2)}{(d+e x)^4} \, dx\) [812]

3.9.12.1 Optimal result
3.9.12.2 Mathematica [A] (verified)
3.9.12.3 Rubi [A] (verified)
3.9.12.4 Maple [F]
3.9.12.5 Fricas [F]
3.9.12.6 Sympy [F]
3.9.12.7 Maxima [F]
3.9.12.8 Giac [F]
3.9.12.9 Mupad [F(-1)]

3.9.12.1 Optimal result

Integrand size = 28, antiderivative size = 197 \[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx=-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{1+n}}{3 (e f-d g) (d+e x)^3}-\frac {\left (c d^2-a e\right ) g (2-n) (f+g x)^{1+n}}{6 e (e f-d g)^2 (d+e x)^2}+\frac {g \left (a e g^2 \left (2-3 n+n^2\right )+c \left (6 e^2 f^2-12 d e f g+d^2 g^2 \left (4+3 n-n^2\right )\right )\right ) (f+g x)^{1+n} \operatorname {Hypergeometric2F1}\left (2,1+n,2+n,\frac {e (f+g x)}{e f-d g}\right )}{6 e (e f-d g)^4 (1+n)} \]

output
-1/3*(a-c*d^2/e)*(g*x+f)^(1+n)/(-d*g+e*f)/(e*x+d)^3-1/6*(c*d^2-a*e)*g*(2-n 
)*(g*x+f)^(1+n)/e/(-d*g+e*f)^2/(e*x+d)^2+1/6*g*(a*e*g^2*(n^2-3*n+2)+c*(6*e 
^2*f^2-12*d*e*f*g+d^2*g^2*(-n^2+3*n+4)))*(g*x+f)^(1+n)*hypergeom([2, 1+n], 
[2+n],e*(g*x+f)/(-d*g+e*f))/e/(-d*g+e*f)^4/(1+n)
 
3.9.12.2 Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.54 \[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx=\frac {g (f+g x)^{1+n} \left (c (e f-d g)^2 \operatorname {Hypergeometric2F1}\left (2,1+n,2+n,\frac {e (f+g x)}{e f-d g}\right )+\left (-c d^2+a e\right ) g^2 \operatorname {Hypergeometric2F1}\left (4,1+n,2+n,\frac {e (f+g x)}{e f-d g}\right )\right )}{e (e f-d g)^4 (1+n)} \]

input
Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4,x]
 
output
(g*(f + g*x)^(1 + n)*(c*(e*f - d*g)^2*Hypergeometric2F1[2, 1 + n, 2 + n, ( 
e*(f + g*x))/(e*f - d*g)] + (-(c*d^2) + a*e)*g^2*Hypergeometric2F1[4, 1 + 
n, 2 + n, (e*(f + g*x))/(e*f - d*g)]))/(e*(e*f - d*g)^4*(1 + n))
 
3.9.12.3 Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.08, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {1193, 87, 78}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx\)

\(\Big \downarrow \) 1193

\(\displaystyle -\frac {\int \frac {(f+g x)^n \left (a g (2-n)-\frac {c d (3 e f-d g (n+1))}{e}-3 c (e f-d g) x\right )}{(d+e x)^3}dx}{3 (e f-d g)}-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{n+1}}{3 (d+e x)^3 (e f-d g)}\)

\(\Big \downarrow \) 87

\(\displaystyle -\frac {\frac {g (2-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{2 e (d+e x)^2 (e f-d g)}-\frac {\left (a e g^2 \left (n^2-3 n+2\right )+c \left (d^2 g^2 \left (-n^2+3 n+4\right )-12 d e f g+6 e^2 f^2\right )\right ) \int \frac {(f+g x)^n}{(d+e x)^2}dx}{2 e (e f-d g)}}{3 (e f-d g)}-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{n+1}}{3 (d+e x)^3 (e f-d g)}\)

\(\Big \downarrow \) 78

\(\displaystyle -\frac {\frac {g (2-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{2 e (d+e x)^2 (e f-d g)}-\frac {g (f+g x)^{n+1} \left (a e g^2 \left (n^2-3 n+2\right )+c \left (d^2 g^2 \left (-n^2+3 n+4\right )-12 d e f g+6 e^2 f^2\right )\right ) \operatorname {Hypergeometric2F1}\left (2,n+1,n+2,\frac {e (f+g x)}{e f-d g}\right )}{2 e (n+1) (e f-d g)^3}}{3 (e f-d g)}-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{n+1}}{3 (d+e x)^3 (e f-d g)}\)

input
Int[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4,x]
 
output
-1/3*((a - (c*d^2)/e)*(f + g*x)^(1 + n))/((e*f - d*g)*(d + e*x)^3) - (((c* 
d^2 - a*e)*g*(2 - n)*(f + g*x)^(1 + n))/(2*e*(e*f - d*g)*(d + e*x)^2) - (g 
*(a*e*g^2*(2 - 3*n + n^2) + c*(6*e^2*f^2 - 12*d*e*f*g + d^2*g^2*(4 + 3*n - 
 n^2)))*(f + g*x)^(1 + n)*Hypergeometric2F1[2, 1 + n, 2 + n, (e*(f + g*x)) 
/(e*f - d*g)])/(2*e*(e*f - d*g)^3*(1 + n)))/(3*(e*f - d*g))
 

3.9.12.3.1 Defintions of rubi rules used

rule 78
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b 
*c - a*d)^n*((a + b*x)^(m + 1)/(b^(n + 1)*(m + 1)))*Hypergeometric2F1[-n, m 
 + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m}, x] 
 &&  !IntegerQ[m] && IntegerQ[n]
 

rule 87
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[(-(b*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p 
+ 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p 
+ 1)))/(f*(p + 1)*(c*f - d*e))   Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] 
/; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || Intege 
rQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ[p, n]))))
 

rule 1193
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) 
 + (c_.)*(x_)^2)^(p_.), x_Symbol] :> With[{Qx = PolynomialQuotient[(a + b*x 
 + c*x^2)^p, d + e*x, x], R = PolynomialRemainder[(a + b*x + c*x^2)^p, d + 
e*x, x]}, Simp[R*(d + e*x)^(m + 1)*((f + g*x)^(n + 1)/((m + 1)*(e*f - d*g)) 
), x] + Simp[1/((m + 1)*(e*f - d*g))   Int[(d + e*x)^(m + 1)*(f + g*x)^n*Ex 
pandToSum[(m + 1)*(e*f - d*g)*Qx - g*R*(m + n + 2), x], x], x]] /; FreeQ[{a 
, b, c, d, e, f, g, n}, x] && IGtQ[p, 0] && ILtQ[2*m, -2] &&  !IntegerQ[n] 
&&  !(EqQ[m, -2] && EqQ[p, 1] && EqQ[2*c*d - b*e, 0])
 
3.9.12.4 Maple [F]

\[\int \frac {\left (g x +f \right )^{n} \left (c e \,x^{2}+2 c d x +a \right )}{\left (e x +d \right )^{4}}d x\]

input
int((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x)
 
output
int((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x)
 
3.9.12.5 Fricas [F]

\[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx=\int { \frac {{\left (c e x^{2} + 2 \, c d x + a\right )} {\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{4}} \,d x } \]

input
integrate((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x, algorithm="fricas")
 
output
integral((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e^4*x^4 + 4*d*e^3*x^3 + 6*d^ 
2*e^2*x^2 + 4*d^3*e*x + d^4), x)
 
3.9.12.6 Sympy [F]

\[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx=\int \frac {\left (f + g x\right )^{n} \left (a + 2 c d x + c e x^{2}\right )}{\left (d + e x\right )^{4}}\, dx \]

input
integrate((g*x+f)**n*(c*e*x**2+2*c*d*x+a)/(e*x+d)**4,x)
 
output
Integral((f + g*x)**n*(a + 2*c*d*x + c*e*x**2)/(d + e*x)**4, x)
 
3.9.12.7 Maxima [F]

\[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx=\int { \frac {{\left (c e x^{2} + 2 \, c d x + a\right )} {\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{4}} \,d x } \]

input
integrate((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x, algorithm="maxima")
 
output
integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^4, x)
 
3.9.12.8 Giac [F]

\[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx=\int { \frac {{\left (c e x^{2} + 2 \, c d x + a\right )} {\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{4}} \,d x } \]

input
integrate((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x, algorithm="giac")
 
output
integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^4, x)
 
3.9.12.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx=\int \frac {{\left (f+g\,x\right )}^n\,\left (c\,e\,x^2+2\,c\,d\,x+a\right )}{{\left (d+e\,x\right )}^4} \,d x \]

input
int(((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4,x)
 
output
int(((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4, x)